<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="航标序列号" prop="zdXlh">
        <el-input
          v-model="queryParams.zdXlh"
          placeholder="请输入航标序列号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
            <el-form-item label="周期" prop="period">
        <el-input
          v-model="queryParams.period"
          placeholder="请输入周期"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['system:info:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />

      <el-table-column label="名称" align="center" prop="mc" />
      <el-table-column label="事件" align="center" prop="eventType" />
      <el-table-column label="航标序列号" align="center" prop="zdXlh" />
      <el-table-column label="定位状态" align="center" prop="dqGpsZt" />
      <el-table-column label="偏差距离" align="center" prop="dqGpsPcjl" />
      <el-table-column label="低功耗状态" align="center" prop="xtZtDgh" />
      <el-table-column label="状态" align="center" prop="online">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.service_status" :value="scope.row.online"/>
        </template>
      </el-table-column>
      <el-table-column label="日志时间" align="center" prop="createTime" width="180">
       <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
        </template>
      </el-table-column>

    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改南方测绘航标数据对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="上传数据日期" prop="eventTime">
          <el-input v-model="form.eventTime" placeholder="请输入上传数据日期" />
        </el-form-item>
        <el-form-item label="当前定位状态" prop="dqGpsZt">
          <el-input v-model="form.dqGpsZt" placeholder="请输入当前定位状态" />
        </el-form-item>
        <el-form-item label="当前实时位置纬度" prop="dqGpsLat">
          <el-input v-model="form.dqGpsLat" placeholder="请输入当前实时位置纬度" />
        </el-form-item>
        <el-form-item label="当前实时位置经度" prop="dqGpsLon">
          <el-input v-model="form.dqGpsLon" placeholder="请输入当前实时位置经度" />
        </el-form-item>
        <el-form-item label="当前偏差距离" prop="dqGpsPcjl">
          <el-input v-model="form.dqGpsPcjl" placeholder="请输入当前偏差距离" />
        </el-form-item>
        <el-form-item label="当前卫星仰角" prop="dqGpsWxyj">
          <el-input v-model="form.dqGpsWxyj" placeholder="请输入当前卫星仰角" />
        </el-form-item>
        <el-form-item label="当前可视卫星通道数" prop="dqGpsKswxtds">
          <el-input v-model="form.dqGpsKswxtds" placeholder="请输入当前可视卫星通道数" />
        </el-form-item>
        <el-form-item label="当前对地速度" prop="dqGpsDdsd">
          <el-input v-model="form.dqGpsDdsd" placeholder="请输入当前对地速度" />
        </el-form-item>
        <el-form-item label="当前gps定位精度" prop="dqGpsDwjd">
          <el-input v-model="form.dqGpsDwjd" placeholder="请输入当前gps定位精度" />
        </el-form-item>
        <el-form-item label="终端基点经度" prop="zdGpsLon">
          <el-input v-model="form.zdGpsLon" placeholder="请输入终端基点经度" />
        </el-form-item>
        <el-form-item label="终端基点纬度" prop="zdGpsLat">
          <el-input v-model="form.zdGpsLat" placeholder="请输入终端基点纬度" />
        </el-form-item>
        <el-form-item label="终端位移阈值" prop="zdGpsWyyz">
          <el-input v-model="form.zdGpsWyyz" placeholder="请输入终端位移阈值" />
        </el-form-item>
        <el-form-item label="终端漂移阈值" prop="zdGpsPyyz">
          <el-input v-model="form.zdGpsPyyz" placeholder="请输入终端漂移阈值" />
        </el-form-item>
        <el-form-item label="终端版本号" prop="zdVersion">
          <el-input v-model="form.zdVersion" placeholder="请输入终端版本号" />
        </el-form-item>
        <el-form-item label="终端固件号1" prop="zdGjh1">
          <el-input v-model="form.zdGjh1" placeholder="请输入终端固件号1" />
        </el-form-item>
        <el-form-item label="终端固件号2" prop="zdGjh2">
          <el-input v-model="form.zdGjh2" placeholder="请输入终端固件号2" />
        </el-form-item>
        <el-form-item label="终端产品号" prop="zdCph">
          <el-input v-model="form.zdCph" placeholder="请输入终端产品号" />
        </el-form-item>
        <el-form-item label="终端序列号" prop="zdXlh">
          <el-input v-model="form.zdXlh" placeholder="请输入终端序列号" />
        </el-form-item>
        <el-form-item label="心 跳 间 隔(秒)" prop="zdPeriod">
          <el-input v-model="form.zdPeriod" placeholder="请输入心 跳 间 隔(秒)" />
        </el-form-item>
        <el-form-item label="消息超时时间(秒)" prop="zdTimeout">
          <el-input v-model="form.zdTimeout" placeholder="请输入消息超时时间(秒)" />
        </el-form-item>
        <el-form-item label="消息重试次数" prop="zdReconnectTimes">
          <el-input v-model="form.zdReconnectTimes" placeholder="请输入消息重试次数" />
        </el-form-item>
        <el-form-item label="当 前 UTC 时 间 戳" prop="zdUtcTime">
          <el-input v-model="form.zdUtcTime" placeholder="请输入当 前 UTC 时 间 戳" />
        </el-form-item>
        <el-form-item label="当前系统GPS天线检测状态" prop="xtZtGps">
          <el-input v-model="form.xtZtGps" placeholder="请输入当前系统GPS天线检测状态" />
        </el-form-item>
        <el-form-item label="当前系统终端GPS状态" prop="xtZtZdgps">
          <el-input v-model="form.xtZtZdgps" placeholder="请输入当前系统终端GPS状态" />
        </el-form-item>
        <el-form-item label="当前系统EPROM状态" prop="xtZtEprom">
          <el-input v-model="form.xtZtEprom" placeholder="请输入当前系统EPROM状态" />
        </el-form-item>
        <el-form-item label="当前系统AD状态" prop="xtZtAd">
          <el-input v-model="form.xtZtAd" placeholder="请输入当前系统AD状态" />
        </el-form-item>
        <el-form-item label="当前系统扩展芯片检测状态" prop="xtZtKzxp">
          <el-input v-model="form.xtZtKzxp" placeholder="请输入当前系统扩展芯片检测状态" />
        </el-form-item>
        <el-form-item label="当前系统充电/灯器控制器/电量测量芯片状态" prop="xtZtCddqdl">
          <el-input v-model="form.xtZtCddqdl" placeholder="请输入当前系统充电/灯器控制器/电量测量芯片状态" />
        </el-form-item>
        <el-form-item label="当前系统低功耗状态" prop="xtZtDgh">
          <el-input v-model="form.xtZtDgh" placeholder="请输入当前系统低功耗状态" />
        </el-form-item>
        <el-form-item label="航标灯设置GPS精度" prop="hbdSzGps">
          <el-input v-model="form.hbdSzGps" placeholder="请输入航标灯设置GPS精度" />
        </el-form-item>
        <el-form-item label="航标灯设置电压门限设置允许位" prop="hbdSzDymxszyxw">
          <el-input v-model="form.hbdSzDymxszyxw" placeholder="请输入航标灯设置电压门限设置允许位" />
        </el-form-item>
        <el-form-item label="航标灯设置日光阈值设置允许位" prop="hbdSzRgyzszyxw">
          <el-input v-model="form.hbdSzRgyzszyxw" placeholder="请输入航标灯设置日光阈值设置允许位" />
        </el-form-item>
        <el-form-item label="航标灯设置串口灯质设置允许位" prop="hbdSzCkdzszyxw">
          <el-input v-model="form.hbdSzCkdzszyxw" placeholder="请输入航标灯设置串口灯质设置允许位" />
        </el-form-item>
        <el-form-item label="航标灯设置GPS定位设备" prop="hbdSzGpsdwsb">
          <el-input v-model="form.hbdSzGpsdwsb" placeholder="请输入航标灯设置GPS定位设备" />
        </el-form-item>
        <el-form-item label="航标灯设置运行模式" prop="hbdSzYxms">
          <el-input v-model="form.hbdSzYxms" placeholder="请输入航标灯设置运行模式" />
        </el-form-item>
        <el-form-item label="航标灯设置强制工作模式" prop="hbdSzQzgzms">
          <el-input v-model="form.hbdSzQzgzms" placeholder="请输入航标灯设置强制工作模式" />
        </el-form-item>
        <el-form-item label="航标灯设置强制工作" prop="hbdSzQzgz">
          <el-input v-model="form.hbdSzQzgz" placeholder="请输入航标灯设置强制工作" />
        </el-form-item>
        <el-form-item label="航标灯设置日光阈值" prop="hbdSzRgyz">
          <el-input v-model="form.hbdSzRgyz" placeholder="请输入航标灯设置日光阈值" />
        </el-form-item>
        <el-form-item label="航标灯设置串口灯质" prop="hbdSzCkdz">
          <el-input v-model="form.hbdSzCkdz" placeholder="请输入航标灯设置串口灯质" />
        </el-form-item>
        <el-form-item label="航标灯当前灯工作标志位" prop="hbdDqDgzbzw">
          <el-input v-model="form.hbdDqDgzbzw" placeholder="请输入航标灯当前灯工作标志位" />
        </el-form-item>
        <el-form-item label="航标灯当前GPS精度" prop="hbdDqGps">
          <el-input v-model="form.hbdDqGps" placeholder="请输入航标灯当前GPS精度" />
        </el-form-item>
        <el-form-item label="航标灯当前电压门限设置允许位" prop="hbdDqDymxszyxw">
          <el-input v-model="form.hbdDqDymxszyxw" placeholder="请输入航标灯当前电压门限设置允许位" />
        </el-form-item>
        <el-form-item label="航标灯当前日光阈值设置允许位" prop="hbdDqRgyzszyxw">
          <el-input v-model="form.hbdDqRgyzszyxw" placeholder="请输入航标灯当前日光阈值设置允许位" />
        </el-form-item>
        <el-form-item label="航标灯当前串口灯质设置允许位" prop="hbdDqCkdzszyxw">
          <el-input v-model="form.hbdDqCkdzszyxw" placeholder="请输入航标灯当前串口灯质设置允许位" />
        </el-form-item>
        <el-form-item label="航标灯当前GPS定位设备" prop="hbdDqGpsdwsb">
          <el-input v-model="form.hbdDqGpsdwsb" placeholder="请输入航标灯当前GPS定位设备" />
        </el-form-item>
        <el-form-item label="航标灯当前运行模式" prop="hbdDqYxms">
          <el-input v-model="form.hbdDqYxms" placeholder="请输入航标灯当前运行模式" />
        </el-form-item>
        <el-form-item label="航标灯当前强制工作模式" prop="hbdDqQzgzms">
          <el-input v-model="form.hbdDqQzgzms" placeholder="请输入航标灯当前强制工作模式" />
        </el-form-item>
        <el-form-item label="航标灯当前强制工作" prop="hbdDqQzgz">
          <el-input v-model="form.hbdDqQzgz" placeholder="请输入航标灯当前强制工作" />
        </el-form-item>
        <el-form-item label="航标灯当前日光阈值" prop="hbdDqRgyz">
          <el-input v-model="form.hbdDqRgyz" placeholder="请输入航标灯当前日光阈值" />
        </el-form-item>
        <el-form-item label="航标灯当前串口灯质" prop="hbdDqCkdz">
          <el-input v-model="form.hbdDqCkdz" placeholder="请输入航标灯当前串口灯质" />
        </el-form-item>
        <el-form-item label="航标灯拨码灯质" prop="hbdDqBmdz">
          <el-input v-model="form.hbdDqBmdz" placeholder="请输入航标灯拨码灯质" />
        </el-form-item>
        <el-form-item label="当前电气静态电压" prop="dqDqJtdy">
          <el-input v-model="form.dqDqJtdy" placeholder="请输入当前电气静态电压" />
        </el-form-item>
        <el-form-item label="当前电气工作电压" prop="dqDqGzdy">
          <el-input v-model="form.dqDqGzdy" placeholder="请输入当前电气工作电压" />
        </el-form-item>
        <el-form-item label="当前电气工作电流" prop="dqDqGzdl">
          <el-input v-model="form.dqDqGzdl" placeholder="请输入当前电气工作电流" />
        </el-form-item>
        <el-form-item label="当前电气充电电压" prop="dqDqCddy">
          <el-input v-model="form.dqDqCddy" placeholder="请输入当前电气充电电压" />
        </el-form-item>
        <el-form-item label="当前电气充电电流" prop="dqDqCddl">
          <el-input v-model="form.dqDqCddl" placeholder="请输入当前电气充电电流" />
        </el-form-item>
        <el-form-item label="当前电气电压高门限" prop="dqDqDygmx">
          <el-input v-model="form.dqDqDygmx" placeholder="请输入当前电气电压高门限" />
        </el-form-item>
        <el-form-item label="当前电气电压低门限" prop="dqDqDydmx">
          <el-input v-model="form.dqDqDydmx" placeholder="请输入当前电气电压低门限" />
        </el-form-item>
        <el-form-item label="终端电板电气静态电压" prop="zdDqJtdy">
          <el-input v-model="form.zdDqJtdy" placeholder="请输入终端电板电气静态电压" />
        </el-form-item>
        <el-form-item label="终端电板电气工作电压" prop="zdDqGzdy">
          <el-input v-model="form.zdDqGzdy" placeholder="请输入终端电板电气工作电压" />
        </el-form-item>
        <el-form-item label="终端电板电气工作电流" prop="zdDqGzdl">
          <el-input v-model="form.zdDqGzdl" placeholder="请输入终端电板电气工作电流" />
        </el-form-item>
        <el-form-item label="终端电板电气充电电压" prop="zdDqCddy">
          <el-input v-model="form.zdDqCddy" placeholder="请输入终端电板电气充电电压" />
        </el-form-item>
        <el-form-item label="终端电板电气充电电流" prop="zdDqCddl">
          <el-input v-model="form.zdDqCddl" placeholder="请输入终端电板电气充电电流" />
        </el-form-item>
        <el-form-item label="轮询时间" prop="lxTime">
          <el-input v-model="form.lxTime" placeholder="请输入轮询时间" />
        </el-form-item>
        <el-form-item label="点名时间" prop="dmTime">
          <el-input v-model="form.dmTime" placeholder="请输入点名时间" />
        </el-form-item>
        <el-form-item label="报警时间" prop="bjTime">
          <el-input v-model="form.bjTime" placeholder="请输入报警时间" />
        </el-form-item>
        <el-form-item label="平台控制命令" prop="mlKzml">
          <el-input v-model="form.mlKzml" placeholder="请输入平台控制命令" />
        </el-form-item>
        <el-form-item label="电量统计口径" prop="dltjkj">
          <el-input v-model="form.dltjkj" placeholder="请输入电量统计口径" />
        </el-form-item>
        <el-form-item label="充电电量" prop="cddl">
          <el-input v-model="form.cddl" placeholder="请输入充电电量" />
        </el-form-item>
        <el-form-item label="放电电量" prop="fddl">
          <el-input v-model="form.fddl" placeholder="请输入放电电量" />
        </el-form-item>
        <el-form-item label="是否轮询" prop="mlZtSflx">
          <el-input v-model="form.mlZtSflx" placeholder="请输入是否轮询" />
        </el-form-item>
        <el-form-item label="是否报警" prop="mlZtSfbj">
          <el-input v-model="form.mlZtSfbj" placeholder="请输入是否报警" />
        </el-form-item>
        <el-form-item label="是否点名" prop="mlZtSfdm">
          <el-input v-model="form.mlZtSfdm" placeholder="请输入是否点名" />
        </el-form-item>
        <el-form-item label="碰撞标志位" prop="mlPzPzbzw">
          <el-input v-model="form.mlPzPzbzw" placeholder="请输入碰撞标志位" />
        </el-form-item>
        <el-form-item label="三轴平方和碰撞阈值" prop="mlPzPzyz">
          <el-input v-model="form.mlPzPzyz" placeholder="请输入三轴平方和碰撞阈值" />
        </el-form-item>
        <el-form-item label="三轴平方和" prop="mlPzSzpfh">
          <el-input v-model="form.mlPzSzpfh" placeholder="请输入三轴平方和" />
        </el-form-item>
        <el-form-item label="航标X轴加速度" prop="mlPzHbxjsd">
          <el-input v-model="form.mlPzHbxjsd" placeholder="请输入航标X轴加速度" />
        </el-form-item>
        <el-form-item label="航标Y轴加速度" prop="mlPzHbyjsd">
          <el-input v-model="form.mlPzHbyjsd" placeholder="请输入航标Y轴加速度" />
        </el-form-item>
        <el-form-item label="航标Z轴加速度" prop="mlPzHbzjsd">
          <el-input v-model="form.mlPzHbzjsd" placeholder="请输入航标Z轴加速度" />
        </el-form-item>
        <el-form-item label="倾角" prop="mlPzQj">
          <el-input v-model="form.mlPzQj" placeholder="请输入倾角" />
        </el-form-item>
        <el-form-item label="航标碰撞报警阈值" prop="mlPzBjyz">
          <el-input v-model="form.mlPzBjyz" placeholder="请输入航标碰撞报警阈值" />
        </el-form-item>
        <el-form-item label="报警参数" prop="mlBjYz">
          <el-input v-model="form.mlBjYz" placeholder="请输入报警参数" />
        </el-form-item>
        <el-form-item label="航标名称" prop="mc">
          <el-input v-model="form.mc" placeholder="请输入航标名称" />
        </el-form-item>
        <el-form-item label="删除标志" prop="delFlag">
          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/system/hbrz/hbrzLog.js"

export default {
  name: "Info",
  dicts: ['service_status'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 南方测绘航标数据表格数据
      infoList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        eventType: null,
        eventTime: null,
        dqGpsZt: null,
        dqGpsLat: null,
        dqGpsLon: null,
        dqGpsPcjl: null,
        dqGpsWxyj: null,
        dqGpsKswxtds: null,
        dqGpsDdsd: null,
        dqGpsDwjd: null,
        zdGpsLon: null,
        zdGpsLat: null,
        zdGpsWyyz: null,
        zdGpsPyyz: null,
        zdVersion: null,
        zdGjh1: null,
        zdGjh2: null,
        zdCph: null,
        zdXlh: null,
        zdPeriod: null,
        zdTimeout: null,
        zdReconnectTimes: null,
        zdUtcTime: null,
        xtZtGps: null,
        xtZtZdgps: null,
        xtZtEprom: null,
        xtZtAd: null,
        xtZtKzxp: null,
        xtZtCddqdl: null,
        xtZtDgh: null,
        hbdSzGps: null,
        hbdSzDymxszyxw: null,
        hbdSzRgyzszyxw: null,
        hbdSzCkdzszyxw: null,
        hbdSzGpsdwsb: null,
        hbdSzYxms: null,
        hbdSzQzgzms: null,
        hbdSzQzgz: null,
        hbdSzRgyz: null,
        hbdSzCkdz: null,
        hbdDqDgzbzw: null,
        hbdDqGps: null,
        hbdDqDymxszyxw: null,
        hbdDqRgyzszyxw: null,
        hbdDqCkdzszyxw: null,
        hbdDqGpsdwsb: null,
        hbdDqYxms: null,
        hbdDqQzgzms: null,
        hbdDqQzgz: null,
        hbdDqRgyz: null,
        hbdDqCkdz: null,
        hbdDqBmdz: null,
        dqDqJtdy: null,
        dqDqGzdy: null,
        dqDqGzdl: null,
        dqDqCddy: null,
        dqDqCddl: null,
        dqDqDygmx: null,
        dqDqDydmx: null,
        zdDqJtdy: null,
        zdDqGzdy: null,
        zdDqGzdl: null,
        zdDqCddy: null,
        zdDqCddl: null,
        lxTime: null,
        dmTime: null,
        bjTime: null,
        mlKzml: null,
        dltjkj: null,
        cddl: null,
        fddl: null,
        mlZtSflx: null,
        mlZtSfbj: null,
        mlZtSfdm: null,
        mlPzPzbzw: null,
        mlPzPzyz: null,
        mlPzSzpfh: null,
        mlPzHbxjsd: null,
        mlPzHbyjsd: null,
        mlPzHbzjsd: null,
        mlPzQj: null,
        mlPzBjyz: null,
        mlBjYz: null,
        mc: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    }
  },
  created() {
    this.getList()
  },
  methods: {
    /** 查询南方测绘航标数据列表 */
    getList() {
      this.loading = true
      listInfo(this.queryParams).then(response => {
        this.infoList = response.rows
        this.total = response.total
        this.loading = false
      })
    },
    // 取消按钮
    cancel() {
      this.open = false
      this.reset()
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        eventType: null,
        eventTime: null,
        dqGpsZt: null,
        dqGpsLat: null,
        dqGpsLon: null,
        dqGpsPcjl: null,
        dqGpsWxyj: null,
        dqGpsKswxtds: null,
        dqGpsDdsd: null,
        dqGpsDwjd: null,
        zdGpsLon: null,
        zdGpsLat: null,
        zdGpsWyyz: null,
        zdGpsPyyz: null,
        zdVersion: null,
        zdGjh1: null,
        zdGjh2: null,
        zdCph: null,
        zdXlh: null,
        zdPeriod: null,
        zdTimeout: null,
        zdReconnectTimes: null,
        zdUtcTime: null,
        xtZtGps: null,
        xtZtZdgps: null,
        xtZtEprom: null,
        xtZtAd: null,
        xtZtKzxp: null,
        xtZtCddqdl: null,
        xtZtDgh: null,
        hbdSzGps: null,
        hbdSzDymxszyxw: null,
        hbdSzRgyzszyxw: null,
        hbdSzCkdzszyxw: null,
        hbdSzGpsdwsb: null,
        hbdSzYxms: null,
        hbdSzQzgzms: null,
        hbdSzQzgz: null,
        hbdSzRgyz: null,
        hbdSzCkdz: null,
        hbdDqDgzbzw: null,
        hbdDqGps: null,
        hbdDqDymxszyxw: null,
        hbdDqRgyzszyxw: null,
        hbdDqCkdzszyxw: null,
        hbdDqGpsdwsb: null,
        hbdDqYxms: null,
        hbdDqQzgzms: null,
        hbdDqQzgz: null,
        hbdDqRgyz: null,
        hbdDqCkdz: null,
        hbdDqBmdz: null,
        dqDqJtdy: null,
        dqDqGzdy: null,
        dqDqGzdl: null,
        dqDqCddy: null,
        dqDqCddl: null,
        dqDqDygmx: null,
        dqDqDydmx: null,
        zdDqJtdy: null,
        zdDqGzdy: null,
        zdDqGzdl: null,
        zdDqCddy: null,
        zdDqCddl: null,
        lxTime: null,
        dmTime: null,
        bjTime: null,
        mlKzml: null,
        dltjkj: null,
        cddl: null,
        fddl: null,
        mlZtSflx: null,
        mlZtSfbj: null,
        mlZtSfdm: null,
        mlPzPzbzw: null,
        mlPzPzyz: null,
        mlPzSzpfh: null,
        mlPzHbxjsd: null,
        mlPzHbyjsd: null,
        mlPzHbzjsd: null,
        mlPzQj: null,
        mlPzBjyz: null,
        mlBjYz: null,
        mc: null,
        delFlag: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null
      }
      this.resetForm("form")
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1
      this.getList()
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm")
      this.handleQuery()
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset()
      this.open = true
      this.title = "添加南方测绘航标数据"
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset()
      const id = row.id || this.ids
      getInfo(id).then(response => {
        this.form = response.data
        this.open = true
        this.title = "修改南方测绘航标数据"
      })
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateInfo(this.form).then(response => {
              this.$modal.msgSuccess("修改成功")
              this.open = false
              this.getList()
            })
          } else {
            addInfo(this.form).then(response => {
              this.$modal.msgSuccess("新增成功")
              this.open = false
              this.getList()
            })
          }
        }
      })
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids
      this.$modal.confirm('是否确认删除南方测绘航标数据编号为"' + ids + '"的数据项？').then(function() {
        return delInfo(ids)
      }).then(() => {
        this.getList()
        this.$modal.msgSuccess("删除成功")
      }).catch(() => {})
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/channelBuoy/export', {
        ...this.queryParams
      }, `channelBuoy${new Date().getTime()}.xlsx`)
    }
  }
}
</script>
